<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="./inc/taglib.jsp" %>

<nav class="navbar navbar-default">
	<div class="container-fluid">
		<div class="navbar-header">
			<a href="#" class="navbar-brand"><span
				class="glyphicon glyphicon-leaf">&nbsp;猎趣</span></a>
		</div>
		<ul class="nav navbar-nav navbar-right">
			<li><a href="#" style="width: 80px;">消息</a></li>
			<li class="dropdown" style="width: 130px;"><a href="#"
				class="dropdown-toggle" data-toggle="dropdown" role="button"
				aria-haspopup="true" aria-expanded="false">欢迎：hehe <span
					class="caret"></span></a>
				<ul class="dropdown-menu">
					<li><a href="#"><span
							class="text-center glyphicon glyphicon-user">个人资料</span></a></li>
					<li><a href="#"><span
							class="text-center glyphicon glyphicon-off">注销</span></a></li>
				</ul></li>
			<li><a><span id="navTime"></span></a> <script
					type="text/javascript">
				window.setInterval(function() {
					var date = new Date();
					var hour = date.getHours();
					var minutes = date.getMinutes();
					var seconds = date.getSeconds();
					$("#navTime").html(
							fomateTime(hour) + ":" + fomateTime(minutes) + ":"
									+ fomateTime(seconds));
				}, 1000);

				function fomateTime(num) {
					if (num < 10) {
						return "0" + num;
					} else {
						return num;
					}
				}
			</script></li>
		</ul>
	</div>
</nav>